.class public Lcom/estrongs/fs/impl/usb/driver/scsi/b;
.super Ljava/lang/Object;
.source "ScsiBlockDevice.java"

# interfaces
.implements Les/a50;


# static fields
.field private static final f:Ljava/lang/String; = "b"


# instance fields
.field private a:Lcom/estrongs/fs/impl/usb/a;

.field private b:Ljava/nio/ByteBuffer;

.field private c:[B

.field private d:I

.field private e:Ljava/lang/Object;


# direct methods
.method static constructor <clinit>()V
    .locals 0

    return-void
.end method

.method public constructor <init>(Lcom/estrongs/fs/impl/usb/a;)V
    .locals 1

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    new-instance v0, Ljava/lang/Object;

    invoke-direct {v0}, Ljava/lang/Object;-><init>()V

    iput-object v0, p0, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->e:Ljava/lang/Object;

    .line 3
    iput-object p1, p0, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->a:Lcom/estrongs/fs/impl/usb/a;

    const/16 p1, 0x1f

    .line 4
    invoke-static {p1}, Ljava/nio/ByteBuffer;->allocate(I)Ljava/nio/ByteBuffer;

    move-result-object p1

    iput-object p1, p0, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->b:Ljava/nio/ByteBuffer;

    const/16 p1, 0xd

    new-array p1, p1, [B

    .line 5
    iput-object p1, p0, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->c:[B

    return-void
.end method

.method private a(Lcom/estrongs/fs/impl/usb/driver/scsi/CommandBlockWrapper;Ljava/nio/ByteBuffer;)Z
    .locals 9
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 1
    iget-object v0, p0, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->e:Ljava/lang/Object;

    monitor-enter v0

    .line 2
    :try_start_0
    iget-object v1, p0, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->b:Ljava/nio/ByteBuffer;

    invoke-virtual {v1}, Ljava/nio/ByteBuffer;->array()[B

    move-result-object v1

    .line 3
    iget-object v2, p0, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->b:Ljava/nio/ByteBuffer;

    invoke-virtual {v2}, Ljava/nio/ByteBuffer;->clear()Ljava/nio/Buffer;

    const/4 v2, 0x0

    .line 4
    invoke-static {v1, v2}, Ljava/util/Arrays;->fill([BB)V

    .line 5
    iget-object v3, p0, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->b:Ljava/nio/ByteBuffer;

    invoke-virtual {p1, v3}, Lcom/estrongs/fs/impl/usb/driver/scsi/CommandBlockWrapper;->a(Ljava/nio/ByteBuffer;)V

    .line 6
    iget-object v3, p0, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->a:Lcom/estrongs/fs/impl/usb/a;

    array-length v4, v1

    invoke-interface {v3, v1, v4}, Lcom/estrongs/fs/impl/usb/a;->b([BI)I

    move-result v3

    .line 7
    array-length v4, v1

    if-eq v3, v4, :cond_0

    .line 8
    sget-object v4, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->f:Ljava/lang/String;

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    const-string v6, "Writing all bytes on command "

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v5, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    const-string v6, " failed!"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-static {v4, v5}, Lcom/estrongs/android/util/n;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 9
    sget-object v4, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->f:Ljava/lang/String;

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    const-string v6, "outArray "

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    array-length v1, v1

    invoke-virtual {v5, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string v1, " written "

    invoke-virtual {v5, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v5, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v4, v1}, Lcom/estrongs/android/util/n;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 10
    :cond_0
    invoke-virtual {p1}, Lcom/estrongs/fs/impl/usb/driver/scsi/CommandBlockWrapper;->b()I

    move-result v1

    if-lez v1, :cond_8

    .line 11
    invoke-virtual {p2}, Ljava/nio/ByteBuffer;->array()[B

    move-result-object v3

    .line 12
    invoke-virtual {p1}, Lcom/estrongs/fs/impl/usb/driver/scsi/CommandBlockWrapper;->a()Lcom/estrongs/fs/impl/usb/driver/scsi/CommandBlockWrapper$Direction;

    move-result-object v4

    sget-object v5, Lcom/estrongs/fs/impl/usb/driver/scsi/CommandBlockWrapper$Direction;->IN:Lcom/estrongs/fs/impl/usb/driver/scsi/CommandBlockWrapper$Direction;

    const/4 v6, -0x1

    if-ne v4, v5, :cond_4

    const/4 v4, 0x0

    .line 13
    :cond_1
    iget-object v5, p0, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->a:Lcom/estrongs/fs/impl/usb/a;

    invoke-virtual {p2}, Ljava/nio/ByteBuffer;->position()I

    move-result v7

    add-int/2addr v7, v4

    invoke-virtual {p2}, Ljava/nio/ByteBuffer;->remaining()I

    move-result v8

    sub-int/2addr v8, v4

    invoke-interface {v5, v3, v7, v8}, Lcom/estrongs/fs/impl/usb/a;->b([BII)I

    move-result v5

    if-eq v5, v6, :cond_3

    add-int/2addr v4, v5

    if-lt v4, v1, :cond_1

    if-ne v4, v1, :cond_2

    goto :goto_0

    .line 14
    :cond_2
    new-instance p2, Ljava/io/IOException;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "Unexpected command size ("

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string v2, ") on response to "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-direct {p2, p1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V

    throw p2

    .line 15
    :cond_3
    new-instance p1, Ljava/io/IOException;

    const-string p2, "reading failed!"

    invoke-direct {p1, p2}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V

    throw p1

    :cond_4
    const/4 v4, 0x0

    .line 16
    :cond_5
    iget-object v5, p0, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->a:Lcom/estrongs/fs/impl/usb/a;

    invoke-virtual {p2}, Ljava/nio/ByteBuffer;->position()I

    move-result v7

    add-int/2addr v7, v4

    invoke-virtual {p2}, Ljava/nio/ByteBuffer;->remaining()I

    move-result v8

    sub-int/2addr v8, v4

    invoke-interface {v5, v3, v7, v8}, Lcom/estrongs/fs/impl/usb/a;->a([BII)I

    move-result v5

    if-eq v5, v6, :cond_7

    add-int/2addr v4, v5

    if-lt v4, v1, :cond_5

    if-ne v4, v1, :cond_6

    goto :goto_0

    .line 17
    :cond_6
    new-instance p2, Ljava/io/IOException;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "Could not write all bytes: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-direct {p2, p1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V

    throw p2

    .line 18
    :cond_7
    new-instance p1, Ljava/io/IOException;

    const-string p2, "writing failed!"

    invoke-direct {p1, p2}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V

    throw p1

    .line 19
    :cond_8
    :goto_0
    iget-object p2, p0, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->a:Lcom/estrongs/fs/impl/usb/a;

    iget-object v1, p0, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->c:[B

    iget-object v3, p0, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->c:[B

    array-length v3, v3

    invoke-interface {p2, v1, v3}, Lcom/estrongs/fs/impl/usb/a;->a([BI)I

    move-result p2

    const/16 v1, 0xd

    if-eq p2, v1, :cond_9

    .line 20
    sget-object v1, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->f:Ljava/lang/String;

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "Unexpected command size while expecting csw "

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v3, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p2

    invoke-static {v1, p2}, Lcom/estrongs/android/util/n;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 21
    :cond_9
    iget-object p2, p0, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->c:[B

    invoke-static {p2}, Ljava/nio/ByteBuffer;->wrap([B)Ljava/nio/ByteBuffer;

    move-result-object p2

    invoke-static {p2}, Lcom/estrongs/fs/impl/usb/driver/scsi/a;->a(Ljava/nio/ByteBuffer;)Lcom/estrongs/fs/impl/usb/driver/scsi/a;

    move-result-object p2

    .line 22
    invoke-virtual {p2}, Lcom/estrongs/fs/impl/usb/driver/scsi/a;->a()B

    move-result v1

    if-eqz v1, :cond_a

    .line 23
    sget-object v1, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->f:Ljava/lang/String;

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "Unsuccessful Csw status: "

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p2}, Lcom/estrongs/fs/impl/usb/driver/scsi/a;->a()B

    move-result v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-static {v1, v3}, Lcom/estrongs/android/util/n;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 24
    :cond_a
    invoke-virtual {p2}, Lcom/estrongs/fs/impl/usb/driver/scsi/a;->b()I

    move-result v1

    invoke-virtual {p1}, Lcom/estrongs/fs/impl/usb/driver/scsi/CommandBlockWrapper;->c()I

    move-result p1

    if-eq v1, p1, :cond_b

    .line 25
    sget-object p1, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->f:Ljava/lang/String;

    const-string v1, "wrong csw tag!"

    invoke-static {p1, v1}, Lcom/estrongs/android/util/n;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 26
    :cond_b
    invoke-virtual {p2}, Lcom/estrongs/fs/impl/usb/driver/scsi/a;->a()B

    move-result p1

    if-nez p1, :cond_c

    const/4 v2, 0x1

    :cond_c
    monitor-exit v0

    return v2

    :catchall_0
    move-exception p1

    .line 27
    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    goto :goto_2

    :goto_1
    throw p1

    :goto_2
    goto :goto_1
.end method


# virtual methods
.method public a()I
    .locals 1

    .line 43
    iget v0, p0, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->d:I

    return v0
.end method

.method public a(JLjava/nio/ByteBuffer;)V
    .locals 4
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 28
    iget-object v0, p0, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->e:Ljava/lang/Object;

    monitor-enter v0

    const-wide/16 v1, 0x0

    cmp-long v3, p1, v1

    if-ltz v3, :cond_2

    const-wide/32 v1, 0x7fffffff

    cmp-long v3, p1, v1

    if-gtz v3, :cond_2

    .line 29
    :try_start_0
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    .line 30
    invoke-virtual {p3}, Ljava/nio/ByteBuffer;->remaining()I

    move-result v1

    iget v2, p0, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->d:I

    rem-int/2addr v1, v2

    if-eqz v1, :cond_0

    .line 31
    iget v1, p0, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->d:I

    invoke-virtual {p3}, Ljava/nio/ByteBuffer;->remaining()I

    move-result v2

    iget v3, p0, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->d:I

    rem-int/2addr v2, v3

    sub-int/2addr v1, v2

    invoke-virtual {p3}, Ljava/nio/ByteBuffer;->remaining()I

    move-result v2

    add-int/2addr v1, v2

    .line 32
    invoke-static {v1}, Ljava/nio/ByteBuffer;->allocate(I)Ljava/nio/ByteBuffer;

    move-result-object v2

    .line 33
    invoke-virtual {v2, v1}, Ljava/nio/ByteBuffer;->limit(I)Ljava/nio/Buffer;

    goto :goto_0

    :cond_0
    move-object v2, p3

    .line 34
    :goto_0
    new-instance v1, Lcom/estrongs/fs/impl/usb/driver/scsi/c;

    long-to-int p2, p1

    invoke-virtual {v2}, Ljava/nio/ByteBuffer;->remaining()I

    move-result p1

    iget v3, p0, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->d:I

    invoke-direct {v1, p2, p1, v3}, Lcom/estrongs/fs/impl/usb/driver/scsi/c;-><init>(III)V

    .line 35
    invoke-direct {p0, v1, v2}, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->a(Lcom/estrongs/fs/impl/usb/driver/scsi/CommandBlockWrapper;Ljava/nio/ByteBuffer;)Z

    .line 36
    invoke-virtual {p3}, Ljava/nio/ByteBuffer;->remaining()I

    move-result p1

    iget p2, p0, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->d:I

    rem-int/2addr p1, p2

    if-eqz p1, :cond_1

    .line 37
    invoke-virtual {v2}, Ljava/nio/ByteBuffer;->array()[B

    move-result-object p1

    const/4 p2, 0x0

    invoke-virtual {p3}, Ljava/nio/ByteBuffer;->array()[B

    move-result-object v1

    invoke-virtual {p3}, Ljava/nio/ByteBuffer;->position()I

    move-result v2

    invoke-virtual {p3}, Ljava/nio/ByteBuffer;->remaining()I

    move-result v3

    invoke-static {p1, p2, v1, v2, v3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    .line 38
    :cond_1
    invoke-virtual {p3}, Ljava/nio/ByteBuffer;->limit()I

    move-result p1

    invoke-virtual {p3, p1}, Ljava/nio/ByteBuffer;->position(I)Ljava/nio/Buffer;

    .line 39
    monitor-exit v0

    return-void

    .line 40
    :cond_2
    new-instance p1, Lcom/estrongs/fs/impl/usb/UsbFsException;

    const-string p2, "Address overflow"

    sget-object p3, Lcom/estrongs/fs/impl/usb/UsbFsException$ERROR_CODE;->USB_ERROR_ADDRESS_OVERFLOW:Lcom/estrongs/fs/impl/usb/UsbFsException$ERROR_CODE;

    invoke-direct {p1, p2, p3}, Lcom/estrongs/fs/impl/usb/UsbFsException;-><init>(Ljava/lang/String;Lcom/estrongs/fs/impl/usb/UsbFsException$ERROR_CODE;)V

    .line 41
    new-instance p2, Ljava/io/IOException;

    invoke-direct {p2, p1}, Ljava/io/IOException;-><init>(Ljava/lang/Throwable;)V

    throw p2

    :catchall_0
    move-exception p1

    .line 42
    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw p1
.end method

.method public a(Lcom/estrongs/fs/impl/usb/a;)V
    .locals 1

    .line 44
    iget-object v0, p0, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->e:Ljava/lang/Object;

    monitor-enter v0

    .line 45
    :try_start_0
    iput-object p1, p0, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->a:Lcom/estrongs/fs/impl/usb/a;

    .line 46
    monitor-exit v0

    return-void

    :catchall_0
    move-exception p1

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw p1
.end method

.method public declared-synchronized b(JLjava/nio/ByteBuffer;)V
    .locals 7
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    monitor-enter p0

    .line 1
    :try_start_0
    iget-object v0, p0, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->e:Ljava/lang/Object;

    monitor-enter v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_1

    const-wide/16 v1, 0x0

    cmp-long v3, p1, v1

    if-ltz v3, :cond_1

    const-wide/32 v1, 0x7fffffff

    cmp-long v3, p1, v1

    if-gtz v3, :cond_1

    .line 2
    :try_start_1
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    .line 3
    invoke-virtual {p3}, Ljava/nio/ByteBuffer;->remaining()I

    move-result v1

    iget v2, p0, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->d:I

    rem-int/2addr v1, v2

    if-eqz v1, :cond_0

    .line 4
    iget v1, p0, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->d:I

    invoke-virtual {p3}, Ljava/nio/ByteBuffer;->remaining()I

    move-result v2

    iget v3, p0, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->d:I

    rem-int/2addr v2, v3

    sub-int/2addr v1, v2

    invoke-virtual {p3}, Ljava/nio/ByteBuffer;->remaining()I

    move-result v2

    add-int/2addr v1, v2

    .line 5
    invoke-static {v1}, Ljava/nio/ByteBuffer;->allocate(I)Ljava/nio/ByteBuffer;

    move-result-object v2

    .line 6
    invoke-virtual {v2, v1}, Ljava/nio/ByteBuffer;->limit(I)Ljava/nio/Buffer;

    .line 7
    invoke-virtual {p3}, Ljava/nio/ByteBuffer;->array()[B

    move-result-object v1

    invoke-virtual {p3}, Ljava/nio/ByteBuffer;->position()I

    move-result v3

    invoke-virtual {v2}, Ljava/nio/ByteBuffer;->array()[B

    move-result-object v4

    const/4 v5, 0x0

    invoke-virtual {p3}, Ljava/nio/ByteBuffer;->remaining()I

    move-result v6

    invoke-static {v1, v3, v4, v5, v6}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    goto :goto_0

    :cond_0
    move-object v2, p3

    .line 8
    :goto_0
    new-instance v1, Lcom/estrongs/fs/impl/usb/driver/scsi/g;

    long-to-int p2, p1

    invoke-virtual {v2}, Ljava/nio/ByteBuffer;->remaining()I

    move-result p1

    iget v3, p0, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->d:I

    invoke-direct {v1, p2, p1, v3}, Lcom/estrongs/fs/impl/usb/driver/scsi/g;-><init>(III)V

    .line 9
    invoke-direct {p0, v1, v2}, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->a(Lcom/estrongs/fs/impl/usb/driver/scsi/CommandBlockWrapper;Ljava/nio/ByteBuffer;)Z

    .line 10
    invoke-virtual {p3}, Ljava/nio/ByteBuffer;->limit()I

    move-result p1

    invoke-virtual {p3, p1}, Ljava/nio/ByteBuffer;->position(I)Ljava/nio/Buffer;

    .line 11
    monitor-exit v0
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    .line 12
    monitor-exit p0

    return-void

    .line 13
    :cond_1
    :try_start_2
    new-instance p1, Lcom/estrongs/fs/impl/usb/UsbFsException;

    const-string p2, "Address overflow"

    sget-object p3, Lcom/estrongs/fs/impl/usb/UsbFsException$ERROR_CODE;->USB_ERROR_ADDRESS_OVERFLOW:Lcom/estrongs/fs/impl/usb/UsbFsException$ERROR_CODE;

    invoke-direct {p1, p2, p3}, Lcom/estrongs/fs/impl/usb/UsbFsException;-><init>(Ljava/lang/String;Lcom/estrongs/fs/impl/usb/UsbFsException$ERROR_CODE;)V

    .line 14
    new-instance p2, Ljava/io/IOException;

    invoke-direct {p2, p1}, Ljava/io/IOException;-><init>(Ljava/lang/Throwable;)V

    throw p2

    :catchall_0
    move-exception p1

    .line 15
    monitor-exit v0
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    :try_start_3
    throw p1
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_1

    :catchall_1
    move-exception p1

    monitor-exit p0

    throw p1
.end method

.method public init()V
    .locals 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    const/16 v0, 0x24

    .line 1
    invoke-static {v0}, Ljava/nio/ByteBuffer;->allocate(I)Ljava/nio/ByteBuffer;

    move-result-object v0

    .line 2
    new-instance v1, Lcom/estrongs/fs/impl/usb/driver/scsi/f;

    invoke-direct {v1}, Lcom/estrongs/fs/impl/usb/driver/scsi/f;-><init>()V

    const/4 v2, 0x0

    .line 3
    invoke-direct {p0, v1, v2}, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->a(Lcom/estrongs/fs/impl/usb/driver/scsi/CommandBlockWrapper;Ljava/nio/ByteBuffer;)Z

    .line 4
    new-instance v1, Lcom/estrongs/fs/impl/usb/driver/scsi/d;

    invoke-direct {v1}, Lcom/estrongs/fs/impl/usb/driver/scsi/d;-><init>()V

    .line 5
    invoke-direct {p0, v1, v0}, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->a(Lcom/estrongs/fs/impl/usb/driver/scsi/CommandBlockWrapper;Ljava/nio/ByteBuffer;)Z

    .line 6
    invoke-static {v0}, Lcom/estrongs/fs/impl/usb/driver/scsi/e;->a(Ljava/nio/ByteBuffer;)Lcom/estrongs/fs/impl/usb/driver/scsi/e;

    move-result-object v0

    .line 7
    invoke-virtual {v0}, Lcom/estrongs/fs/impl/usb/driver/scsi/e;->a()I

    move-result v1

    iput v1, p0, Lcom/estrongs/fs/impl/usb/driver/scsi/b;->d:I

    .line 8
    invoke-virtual {v0}, Lcom/estrongs/fs/impl/usb/driver/scsi/e;->b()I

    return-void
.end method
